The present disclosure is related to an encoder for generating parity data and, more particularly, to an encoder for generating parity data that is prepended to data and serially transmitted.
In digital data serial communication systems, parity data normally is appended to transmission data. The parity data is used to detect transmission errors.
When a data stream including N sets of data is transmitted from a transmitter, every one of the N sets of data is necessary to calculate parity. Accordingly, when appending parity data to the data, the transmitter dynamically calculates the parity data while sequentially transmitting data. In this case, a receiver first receives the N sets of data and then receives the appended parity data, which were generated based on the N sets of data. Thus, the parity data is not received until all of the N sets of data have been received. Accordingly, after receiving all of the data, an error check using the parity data is performed. Thus, when using appended parity data, a communication error cannot be detected at an early stage.
To cope with this problem, parity data may be prepended to the N sets of data that are to be transmitted. Then, for example, if a short circuit occurs in a communication line and produces an error in which all of the received data is fixed to 0 or 1, the use of prepended parity data would enable the receiver to detect such an erroneous state during an initial period of the communication. Thus, it would be advantageous to have an encoder that generates prepended parity data.